import request from '../utils/request.js'

export function getCodeImg() {
    return request({
        url: 'http://localhost:9090/dev-api/captchaImage',
        method: 'get',
        headers: {
            notToken: true
        },
        timeout: 20000
    })
}

export function getInfo() {
    return request({
        url: 'http://localhost:9090/dev-api/getInfo',
        method: 'get',
    })
}

export function login(username, password, code, uuid) {
    const data = {
        username,
        password,
        code,
        uuid
    }
    return request({
        url: 'http://localhost:9090/dev-api/login',
        method: 'post',
        headers: {
            notToken: true
        },
        data: data
    })
}

export function logout() {
    return request({
        url: 'http://localhost:9090/dev-api/logout',
        method: 'post',
    })
}


